<template>
  <div>
    <h1>vant</h1>
    <van-button @click="myget" type="primary">主要按钮GET</van-button>
    <van-button @click="mypost" type="info">信息按钮POST</van-button>
    <van-button type="default">默认按钮</van-button>
    <van-button type="warning">警告按钮</van-button>
    <van-button type="danger">危险按钮</van-button>
    <van-cell-group>
      <van-cell title="单元格" value="内容" />
      <van-cell title="单元格" value="内容" label="描述信息" />
    </van-cell-group>
    <van-icon name="chat-o" dot />
    <van-icon name="chat-o" badge="9" />
    <van-icon name="chat-o" badge="99+" />
  </div>
</template>

<script>
const axios = require("axios");
export default {
  data() {
    return {
      date: "",
      show: false,
    };
  },
  methods: {
    formatDate(date) {
      return `${date.getMonth() + 1}/${date.getDate()}`;
    },
    myget() {
      axios
        .get("http://sky.nnzhp.cn/api/sparrow/student")
        .then(function (reponse) {
          console.log(response);
        })
        .catch(function (error) {
          console.log(error);
        })
        .then(function () {});
    },
    mypost() {
      axios
        .post("http://sky.nnzhp.cn/api/user/register", {
          phone:"19956083267",
          email:"123456@qq.com",
          nick:"web222",
          password:"111",
          password2:"111"
        })
        .then(function (response) {
          console.log(response);
        })
        .catch(function (error) {
          console.log(error);
        });
    },
  },
};
</script>

<style scoped>
</style>